package com.lg.spring;

import com.lg.spring.pojo.Student;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;

/**
 * @author by Mr. Li 2020/6/13 16:11
 */
public class IgnoreAutowiringProcessor implements BeanFactoryPostProcessor {


    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
        System.out.println("-----------------我什么时候才会执行呢?");
        beanFactory.ignoreDependencyType(Student.class);
    }

}
